/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.openbravo.data.loader;

import com.openbravo.data.basic.BasicException;

/**
 *
 * @author Administrator
 */
public class SerializerReadBasicExt implements SerializerRead {

    private Datas[] m_classes;
    private int[] m_index;

    /** Creates a new instance of SerializerReadBasic */
    public SerializerReadBasicExt(Datas[] classes, int[] index) {
        m_classes = classes;
        m_index=index;
    }
    
    public Object readValues(DataRead dr) throws BasicException {

        Object[] m_values = new Object[m_index.length];
        for (int i = 0; i < m_index.length; i++) {
            m_values[i] = m_classes[m_index[i]].getValue(dr, i + 1);
        }
        return m_values;
    }

      }
